package com.qf.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qf.mapper.TbGoodMapper;
import com.qf.pojo.TbGood;
import com.qf.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodServiceImpl implements GoodService {
    @Autowired
    private TbGoodMapper goodMapper;
    @Override
    public Page<TbGood> selectGoodByIdAndCategoryById(String brandId, String categoryId,Integer pageNum,Integer pageSize) {
        Page<TbGood> page = new Page<>(pageNum,pageSize);
        goodMapper.selectBrandByCateId(page,categoryId,brandId);
        return page;
    }

    @Override
    public TbGood selectGoodById(String goodId) {
        return goodMapper.selectById(goodId);

    }
}
